package com.alks.function.data.request.chengKong;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
public class MaterialUpdate2Request {

    @ApiModelProperty(value = "物料编码")
    private String mtlNo;

    @ApiModelProperty("材料名称")
    private String mtlName;

    @ApiModelProperty("宽幅")
    private String mtlSpec;

    @ApiModelProperty("单位")
    private String mtlUnit;


    public boolean isEqual(MaterialUpdate2Request other) {
        // 判断 mtlNo 属性是否相等
        if (mtlNo == null && other.mtlNo != null) {
            return false;
        } else if (mtlNo != null && !mtlNo.equals(other.mtlNo)) {
            return false;
        }

        // 判断 mtlName 属性是否相等
        if (mtlName == null && other.mtlName != null) {
            return false;
        } else if (mtlName != null && !mtlName.equals(other.mtlName)) {
            return false;
        }

        // 判断 mtlSpec 属性是否相等
        if (mtlSpec == null && other.mtlSpec != null) {
            return false;
        } else if (mtlSpec != null && !mtlSpec.equals(other.mtlSpec)) {
            return false;
        }

        // 判断 mtlUnit 属性是否相等
        if (mtlUnit == null && other.mtlUnit != null) {
            return false;
        } else if (mtlUnit != null && !mtlUnit.equals(other.mtlUnit)) {
            return false;
        }
        return true;
    }
}
